Skip to content

chore: protocols → handlers#1556

Open
beaugunderson wants to merge 2 commits intomainfrom
bg-handlers
Open

chore: protocols → handlers#1556
beaugunderson wants to merge 2 commits intomainfrom
bg-handlers

Conversation

@beaugunderson
Copy link
Member

@beaugunderson beaugunderson commented Mar 5, 2026

https://canvasmedical.atlassian.net/browse/KOALA-4392

Complete the migration from legacy "protocol" naming to "handler" naming across example plugins and test fixtures. This is a follow-up to fdd750ec which renamed protocols/ directories, updated manifest keys, and switched imports — but left class names and filenames using protocol terminology.

  • Rename classes like AppointmentLabelsProtocolAppointmentLabelsHandler, ProtocolHandler, InvalidProtocolInvalidHandler in example plugins and test fixtures
  • Rename files like my_protocol.pymy_handler.py, protocol.pyhandler.py across 16 plugins/fixtures
  • Update all corresponding CANVAS_MANIFEST.json class paths, test imports, and assertions
  • Update validator test fixture to use handlers key instead of legacy protocols

No behavioral changes. The canvas_sdk/protocols/ module and BaseProtocol class are preserved as legacy aliases for backwards compatibility with published plugins.

Also adds a CLAUDE.md to ensure future generated code uses the correct naming.

documentation PR: canvas-medical/documentation#1093

Test plan

  • All 3085 unit tests pass
  • Grep confirms no remaining protocol class names outside the legacy compat module and intentional backwards-compat tests

@beaugunderson beaugunderson requested a review from a team as a code owner March 5, 2026 19:21
@github-actions github-actions bot added the Jira: Not Linked PR body does not contain a Jira link label Mar 5, 2026
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.51%. Comparing base (6022be4) to head (fa0f7ee).

Files with missing lines Patch % Lines
canvas_cli/apps/plugin/plugin.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1556      +/-   ##
==========================================
- Coverage   93.51%   93.51%   -0.01%     
==========================================
  Files         487      487              
  Lines       21835    21834       -1     
  Branches     1012     1012              
==========================================
- Hits        20418    20417       -1     
  Misses       1266     1266              
  Partials      151      151              
Flag Coverage Δ
plugin-abnormal_lab_task_notification 100.00% <ø> (ø)
plugin-api_samples 33.33% <ø> (ø)
plugin-appointment_coverage_label 100.00% <100.00%> (ø)
plugin-coverage_metadata_sync 100.00% <100.00%> (ø)
plugin-my_first_plugin 100.00% <100.00%> (ø)
plugin-patient_summary_chart_groups 100.00% <ø> (ø)
plugin-preact_hello_world 100.00% <ø> (ø)
plugin-send_all_prescriptions 100.00% <ø> (ø)
plugin-simple_note_button_plugin 100.00% <ø> (ø)
plugin-supervising_provider_prescribe 100.00% <100.00%> (ø)
plugin-supervising_provider_prescribe_protocol 100.00% <100.00%> (ø)
plugin-upsert_patient_metadata 100.00% <ø> (ø)
plugin-vitals_visualizer_plugin 98.43% <ø> (ø)
py3.11 93.53% <66.66%> (+<0.01%) ⬆️
py3.12 93.53% <66.66%> (+<0.01%) ⬆️
sdk-core 93.53% <66.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@beaugunderson beaugunderson changed the title protocols → handlers chore: protocols → handlers Mar 5, 2026
@beaugunderson beaugunderson requested a review from aduane March 5, 2026 21:16
@github-actions github-actions bot added Jira: Linked PR body contains a Jira link and removed Jira: Not Linked PR body does not contain a Jira link labels Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Jira: Linked PR body contains a Jira link

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants